﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using HZ.MBSM.DBUtility; 
public partial class Agency_project_bulletininfo : System.Web.UI.Page
{
    public string projectid, strTitle, strProjectBeginDate, strProjectEndDate, strBidDate, strContent, strDOWNURL;

    protected void Page_Load(object sender, EventArgs e)
    {
        projectid = SysFun.IsSQL(SysFun.IsSQL(SysFun.ToTrim(Request.QueryString["projectid"])));

        if (!this.IsPostBack)
        {
            if (projectid != "" && projectid != null)
            {
                string sql = " select title,ProjectBeginDate,ProjectEndDate,BidDate,Content,DOWNURL from project_bulletin ";
                sql += " WHERE projectid = " + projectid;
                Db db = new Db();
                System.Data.IDataReader dr;
                dr = db.DataReader(sql);
                if (dr.Read())
                {
                    strTitle = dr["title"].ToString();
                    strProjectBeginDate = Convert.ToDateTime(dr["ProjectBeginDate"].ToString()).ToShortDateString();
                    strProjectEndDate = Convert.ToDateTime(dr["ProjectEndDate"].ToString()).ToShortDateString();
                    strBidDate = Convert.ToDateTime(dr["BidDate"].ToString()).ToShortDateString();
                    strContent = dr["Content"].ToString().Replace("\r\n", "<br>");
                    strDOWNURL = SysFun.ToTrim(dr["DOWNURL"].ToString());
                    if (strDOWNURL != "")
                    {
                        Label1.Text = "<a class=9tw href='../UploadFile/" + strDOWNURL + "' style='cursor:hand;' ><font size='2'>招标文件下载</font></a>&nbsp;&nbsp;";
                    }
                    else
                    {
                        Label1.Visible = false;
                    }
                   
                }
                dr.Close();
                dr.Dispose();
                db.Close();

            }
        }

    }
}